
<%@ page import="com.atendimento.Local" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <title><g:message code="local.edit" default="Edit Local" /></title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLinkTo(dir: '')}"><g:message code="home" default="Home" /></a></span>
            <span class="menuButton"><g:link class="list" action="list"><g:message code="local.list" default="Local List" /></g:link></span>
            <span class="menuButton"><g:link class="create" action="create"><g:message code="local.new" default="New Local" /></g:link></span>
        </div>
        <div class="body">
            <h1><g:message code="local.edit" default="Edit Local" /></h1>
            <g:if test="${flash.message}">
            <div class="message"><g:message code="${flash.message}" args="${flash.args}" default="${flash.defaultMessage}" /></div>
            </g:if>
            <g:hasErrors bean="${localInstance}">
            <div class="errors">
                <g:renderErrors bean="${localInstance}" as="list" />
            </div>
            </g:hasErrors>
            <g:form method="post" >
                <g:hiddenField name="id" value="${localInstance?.id}" />
                <g:hiddenField name="version" value="${localInstance?.version}" />
                <div class="dialog">
                    <table>
                        <tbody>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="descricao"><g:message code="local.descricao" default="Descricao" />:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: localInstance, field: 'descricao', 'errors')}">
                                    <g:textField name="descricao" value="${localInstance?.descricao}" />

                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="endereco"><g:message code="local.endereco" default="Endereco" />:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: localInstance, field: 'endereco', 'errors')}">
                                    <g:textField name="endereco" value="${localInstance?.endereco}" />

                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="complemento"><g:message code="local.complemento" default="Complemento" />:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: localInstance, field: 'complemento', 'errors')}">
                                    <g:textField name="complemento" value="${localInstance?.complemento}" />

                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="bairro"><g:message code="local.bairro" default="Bairro" />:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: localInstance, field: 'bairro', 'errors')}">
                                    <g:textField name="bairro" value="${localInstance?.bairro}" />

                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="cidade"><g:message code="local.cidade" default="Cidade" />:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: localInstance, field: 'cidade', 'errors')}">
                                    <g:textField name="cidade" value="${localInstance?.cidade}" />

                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="cep"><g:message code="local.cep" default="Cep" />:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: localInstance, field: 'cep', 'errors')}">
                                    <g:textField name="cep" value="${localInstance?.cep}" />

                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="foneResidencial"><g:message code="local.foneResidencial" default="Fone Residencial" />:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: localInstance, field: 'foneResidencial', 'errors')}">
                                    <g:textField name="foneResidencial" value="${localInstance?.foneResidencial}" />

                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="foneComercial"><g:message code="local.foneComercial" default="Fone Comercial" />:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: localInstance, field: 'foneComercial', 'errors')}">
                                    <g:textField name="foneComercial" value="${localInstance?.foneComercial}" />

                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="foneCelular"><g:message code="local.foneCelular" default="Fone Celular" />:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: localInstance, field: 'foneCelular', 'errors')}">
                                    <g:textField name="foneCelular" value="${localInstance?.foneCelular}" />

                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="observacao"><g:message code="local.observacao" default="Observacao" />:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: localInstance, field: 'observacao', 'errors')}">
                                    <g:textField name="observacao" value="${localInstance?.observacao}" />

                                </td>
                            </tr>
                        
                        </tbody>
                    </table>
                </div>
                <div class="buttons">
                    <span class="button"><g:actionSubmit class="save" action="update" value="${message(code: 'update', 'default': 'Update')}" /></span>
                    <span class="button"><g:actionSubmit class="delete" action="delete" value="${message(code: 'delete', 'default': 'Delete')}" onclick="return confirm('${message(code: 'delete.confirm', 'default': 'Are you sure?')}');" /></span>
                </div>
            </g:form>
        </div>
    </body>
</html>
